﻿QuickUI.domReady(function() {

	var a = new QuickUI.Window("win1", {
		title : "这是标题",
		width : 400,
		height : 300,
		top : 10,
		left : 100,
		dragable : true,
		resizeable : true,
		mixSize : true,
		minSize : true,
		tools : [{
					id : "maxSize"
				}, {
					id : "minSize"
				}, {
					id : "reflash",
					handler : function() {
						alert("reflash");
					}
				}, {
					id : "print",
					handler : function() {
						window.print();
					}
				}, {
					id : "save",
					handler : function() {
						alert("save");
					}
				}, {
					id : "help",
					handler : function() {
						alert("help");
					}
				}],

		message : function(dialog) {
			var $message = QuickUI('<div style="overflow:hidden;"><form id="changepwd" method="post"  action="" role="form" ></form></div>');
			var pageToLoad = dialog.getData('pageToLoad');
			return $message.load(pageToLoad);
		},
		data : {
			'pageToLoad' : '../message/changePwd.html'
		}

	});
	a.open();
	
	var tree = new QuickUI.Tree({
		width:200,
		height:400,
		top:100,
		left:100,
		root:{
			children:[{
				text:"根节点1",
				children:[
					{
						text:"子节点1",
						children:[{
							text:"子节点2"
						},{
							text:"子节点2"
						}]
					},{
						text:"子节点2",
						handler : function() {
							// alert(this);
							//alert(this);
							this.href = "javascript:void(0)";
							// this.target="_frameName";
						}
					}
				]
			},{
				text:"根节点2",
				handler:function(){
					this.href = "./Test/testTree.html";
					//alert(this);
				}
			},{
				text:"根节点3"
			}]
		}
	});
	var node = new QuickUI.TreeNode("新增根节点");
	var no = new QuickUI.TreeNode("新增子节点1");
	var no1 =new QuickUI.TreeNode("新增孙节点1");
	node.addChild(no);
	no.addChild(no1);
	tree.addRootNode(node);
	
	tree.show();
	//tree.addRootNode(node);
	//tree.show();
	// b.open();
	
});